<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('Add/index')}">中餐学院新闻公告</a></li>
        <li><a href="{:url('Add/add')}">添加新闻公告</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="{:url('Add/index')}">
        <input type="text" class="form-control" name="keyword" style="width: 200px;" value="{:input('request.keyword/s','')}" placeholder="请输入标题或作者">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Add/index')}">清空</a >
    </form>
    <form method="post" class="js-ajax-form margin-top-20" action="{:url('Add/order')}">
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">排序</button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <tr>
                <th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
                <th width="50">{:lang('SORT')}</th>
                <th width="50">ID</th>
                <th width="50">收货人</th>
                <th width="50">联系电话</th>
                <th width="100">所在地区</th>
                <th width="150">详细地址</th>
                <th width="50">{:lang('ACTIONS')}</th>
            </tr>

            <tbody>
                <foreach name="list" item="v">
                <tr>
                    <td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value=""></td>
                    <td><input type="text" name="list_orders[{$v.id}]" value="{$v.list_order}" style="width: 50px;"></td>
                    <td>{$v.id}</td>
                    <td>{$v.consignee}</td>
                    <td>{$v.mobile}</td>
                    <td>{$v.area}</td>
                    <td>{$v.address}</td>
                    <td>
                        <a class="btn btn-xs btn-primary" href="{:url('Add/edit',array('id'=>$v['id']))}">{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('Add/delete',array('id'=>$v['id']))}">
                            {:lang('DELETE')}
                        </a>
                    </td>
                </tr>
                </foreach>
            </tbody>
        </table>
        <div>
            共有{$list->total()}条数据，每页显示{$list->listRows()}条，当前第{$list->currentPage()}页，共{$list->lastPage()}页
        </div>
        <div class="pagination">{$list->render()}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
<script src="__STATIC__/js/js-image-previewer.js?v={$_static_version}"></script>
</body>
</html>
